Simple algebraic data types for C
نویسندگان
چکیده
ADT is a simple tool in the spirit of Lex and Yacc that makes algebraic data types and a restricted form of pattern matching on those data types as found in SML available in C programs. ADT adds runtime checks, which make C programs written with the aid of ADT less likely to dereference a NULL pointer. The runtime tests may consume a significant amount of CPU time; hence they can be switched off once the program is suitably debugged.
منابع مشابه
Adtpp: lightweight efficient safe polymorphic algebraic data types for C
Adtpp is an open-source tool that adds support for algebraic data types (ADTs) to the C programming language. ADTs allow more precise description of program types and more robust handling of data structures than are directly supported by C. ADT definitions and other declarations are put in a file that is preprocessed by adtpp to produce a C header (‘.h’) file that can be included in C source fi...
متن کاملStatic Dependency Pair Method in Rewriting Systems for Functional Programs with Product, Algebraic Data, and ML-Polymorphic Types
For simply-typed term rewriting systems (STRSs) and higher-order rewrite systems (HRSs) à la Nipkow, we proposed a method for proving termination, namely the static dependency pair method. The method combines the dependency pair method introduced for first-order rewrite systems with the notion of strong computability introduced for typed λ-calculi. This method analyzes a static recursive struct...
متن کاملAlgebraic Domain Equations
This paper discusses a new specification method for algebraic data types consisting of an algebraic analogon to domain equations as known from Scott's theory (1971) of order-theoretic data types. The main result is that strongly persistent algebraic domain equations always have an initial solution, and there is a simple syntactic method to construct a specification of this initial solution. Exa...
متن کاملDeciding and Interpolating Algebraic Data Types by Reduction (Technical Report)
Recursive algebraic data types (term algebras, ADTs) are one of the most well-studied theories in logic, and find application in contexts including functional programming, modelling languages, proof assistants, and verification. At this point, several state-of-the-art theorem provers and SMT solvers include tailor-made decision procedures for ADTs, and version 2.6 of the SMT-LIB standard includ...
متن کاملOn the Edge-Difference and Edge-Sum Chromatic Sum of the Simple Graphs
For a coloring $c$ of a graph $G$, the edge-difference coloring sum and edge-sum coloring sum with respect to the coloring $c$ are respectively $sum_c D(G)=sum |c(a)-c(b)|$ and $sum_s S(G)=sum (c(a)+c(b))$, where the summations are taken over all edges $abin E(G)$. The edge-difference chromatic sum, denoted by $sum D(G)$, and the edge-sum chromatic sum, denoted by $sum S(G)$, a...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Softw., Pract. Exper.
دوره 42 شماره
صفحات -
تاریخ انتشار 2012